<?php
class MyZend_View_Helper_MyDateBox extends Zend_View_Helper_Abstract {
	public function myDateBox($name, $id, $value = '', $attribs = array()) {
		$strAttribs = '';
		// if isset attribs
		if(count($attribs) > 0) {
			foreach ($attribs as $keyAttribs => $valueAttribs) {
				$strAttribs .= $keyAttribs. '="' . $valueAttribs . '" ';
			}
				
		}
		$xhtml = '<script>
	                $(function() {
		                 $( "#' . $id . '" ).datepicker({
			                 changeMonth: true,
			                 changeYear: true
		                 });
	                });
	             </script><input type="text" name = "' . $name . '" id="'. $id .  '" ' . $strAttribs. '"  value = "' . $value . '">';
		
		return $xhtml;
	}
}